/*
 * 百度在线网络技术（北京）有限公司拥有本软件版权2021并保留所有权利。
 * Copyright 2021, Baidu.com,Inc 2:Baidu Online Network Technology (Beijing) Co.,Ltd,
 * All rights reserved.
 */

package com.azdebugit.jvm.zhuangtaiji._1;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class ActionMapping {

    /**
     * 当前状态
     */
    private State currentState;

    /**
     * 次态
     */
    private State nextState;

    /**
     * 动作
     */
    private Action action;

    /**
     * 事件
     */
    private Event event;


    public static ActionMapping ofMap(State currentState, Event event, State nextState, Action action) {
        return new ActionMapping(currentState, event, nextState, action);
    }

    private ActionMapping(State currentState, Event event, State nextState, Action action) {
        this.currentState = currentState;
        this.nextState = nextState;
        this.action = action;
        this.event = event;
    }
}
